package com.euond.accv.mdm.web;

import java.util.Date;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * 欢迎页控制器
 */
@Controller
public class WelcomeController {
    @Value("${application.message:Hello World}")
    private String message = "Hello World";
    @Value("${server.context-path:}")
    protected String basePath;
    

    @RequestMapping("/welcome")
    public String welcome(Model model) {
    	model.addAttribute("time", new Date());
        model.addAttribute("message", this.message);
        // 应用路径
    	model.addAttribute("basePath", basePath);
        return "ftl/welcome";
    }
}
